IF OBJECT_ID('ssf.regex_replace_4000') IS NOT NULL
	DROP FUNCTION [ssf].[regex_replace_4000];
GO

CREATE FUNCTION [ssf].[regex_replace_4000](
	@input NVARCHAR(4000)
	, @pattern NVARCHAR(4000)
	, @replacement NVARCHAR(4000))
RETURNS NVARCHAR(4000)
WITH EXECUTE AS CALLER
	, RETURNS NULL ON NULL INPUT
AS
EXTERNAL NAME [UtilityRegex].[SQLServerFramework.UtilityRegex].[RegexReplace4000]
GO
